<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>物业管理系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="./js/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="./css/common.css" media="all">
    <script src="./js/layui/layui.all.js"></script>
    <script src="./js/token.js"></script>
</head>
<style type="text/css">
    #textfield {
        border: 1px solid rgba(152, 166, 173, 0.15);
        font-size: 13px;
        height: 34px;
        padding-left: 20px;
        padding-right: 40px;
        margin: 13px 15px 0px 25px;
        background: rgba(152, 166, 173, 0.1);
        box-shadow: none;
        border-radius: 30px;
        width: 200px;
        cursor: text;
        float: left;
    }

    #shusearch {
        cursor: pointer;
        width: 30px;
        float: left;
        margin-top: 20px;
        margin-left: -40px;
    }
</style>
<body class="layui-layout-body">

<div id="LAY_app">
    <div class="layui-layout layui-layout-admin">
        <div class="layui-header">
            <!-- 头部区域 -->
            <ul class="layui-nav layui-layout-left">
                <li class="layui-nav-item layadmin-flexible" lay-unselect>
                    <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
                        <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
                    </a>
                </li>
                <li class="layui-nav-item" lay-unselect>
                    <a href="javascript:;" layadmin-event="refresh" title="刷新" id="sx">
                        <i class="layui-icon layui-icon-refresh-3"></i>
                    </a>
                </li>
            </ul>
            <ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
                <li class="layui-nav-item " lay-unselect><!--layui-hide-xs-->
                    <a href="javascript:;" layadmin-event="theme">
                        <i class="layui-icon layui-icon-theme"></i>
                    </a>
                </li>
                <li class="layui-nav-item layui-hide-xs" lay-unselect>
                    <a href="javascript:;" layadmin-event="fullscreen">
                        <i class="layui-icon layui-icon-screen-full"></i>
                    </a>
                </li>
                <li class="layui-nav-item" lay-unselect>
                    <a href="javascript:;" id="adminName"></a>
                    <dl class="layui-nav-child">
                        <dd><a onclick="logout()">切换用户</a></dd>
                        <dd><a href="javascript:void(0)" onclick="update_password()">修改密码</a></dd>
                        <hr>
                        <dd style="text-align: center;"><a onclick="logout()">退出</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item" lay-unselect>
                    <a href="javascript:;" id="uname"></a>
                    <a id="deng" href="index.html" style="display: none">请先登录</a>
                </li>
            </ul>
        </div>

        <!-- 侧边菜单 -->
        <div class="layui-side layui-side-menu">
            <div class="layui-side-scroll">
                <div class="layui-logo" style="background-color: #20222A !important;">
                    <span>物业管理系统</span>
                </div>
                <ul class="layui-nav layui-nav-tree"  lay-filter="layadmin-system-side-menu" lay-shrink="all" id="LAY-system-side-menu">
                    <li data-name="home" class="layui-nav-item layui-this" id="home" >
                        <a  href="main/home.html" _lay-href="main/home.html" lay-tips="主页" target="mainframe" lay-direction="2">
                            <i class="layui-icon layui-icon-home"></i>
                            <cite>主页</cite>
                        </a>
                    </li>
                    <li data-name="component" class="layui-nav-item">
                        <a href="javascript:;" lay-tips="管理" lay-direction="2">
                            <i class="layui-icon layui-icon-component"></i>
                            <cite>基础数据</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd data-name="nav">
                                <a href="main/wuye/addwuye.html" _lay-href="wuye/addwuye.html" id="addwuye" target="mainframe">新增物业</a>
                            </dd>
                            <dd data-name="nav">
                                <a href="main/wuye/wuye.html" _lay-href="wuye/wuye.html" id="wuye" target="mainframe" class="clearStorage">物业管理</a>
                            </dd>
                            <dd data-name="progress">
                                <a href="main/qiye/addqiye.html"  _lay-href="qiye/addqiye.html" target="mainframe">新增企业</a>
                            </dd>
                            <dd data-name="progress">
                                <a href="main/qiye/qiye.html"  _lay-href="qiye/qiye.html" target="mainframe" class="clearStorage">企业管理</a>
                            </dd>
<!--                            <dd data-name="panel">-->
<!--                                <a href="main/qiye/qiye_history.html" _lay-href="qiye/qiye_history.html" target="mainframe" class="clearStorage">企业回收站</a>-->
<!--                            </dd>-->
                            <dd data-name="panel">
                                <a href="main/staff/addstaff.html" _lay-href="staff/addstaff.html" target="mainframe">新增员工</a>
                            </dd>
                            <dd data-name="panel">
                                <a href="main/staff/staff.html" _lay-href="staff/staff.html" target="mainframe" class="clearStorage">员工管理</a>
                            </dd>
<!--                            <dd data-name="panel">-->
<!--                                <a href="staff/staff_his.html" _lay-href="staff/staff_his.html" target="mainframe" class="clearStorage">员工回收站</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="panel">-->
<!--                                <a href="staff/staff_weigui.html" _lay-href="staff/staff_weigui.html" target="mainframe" class="clearStorage">违规人员列表</a>-->
<!--                            </dd>-->
                            <dd>
                                <a target="mainframe"  href="main/gate/gate.html" lay-text="闸机列表" class="clearStorage">闸机列表</a>
                            </dd>
<!--                            <dd>-->
<!--                                <a target="mainframe"  href="zhiye_change/admin_zhiye_change.html" lay-text="职业变更记录" class="clearStorage">职业变更记录</a>-->
<!--                                <span class="layui-badge" style="display:none;margin-left: 140px;" id="zysh2"></span>-->
<!--                            </dd>-->
                        </dl>
                    </li>
                    <li data-name="app" class="layui-nav-item">
                        <a href="javascript:;" lay-tips="收费管理" lay-direction="2">
                            <i class="layui-icon layui-icon-rmb"></i>
                            <cite>收费管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd data-name="nav">
                                <a target="mainframe" href="main/shoufei/addQiyeShoufei.html">企业收费</a>
                            </dd>
                            <dd data-name="tabs">
                                <a target="mainframe" href="main/shoufei/qiyeShoufei.html" class="clearStorage">企业收费记录</a>
                            </dd>
                            <dd data-name="tabs">
                                <a target="mainframe" href="main/shoufei/jijiangdaoqiQiye.html" class="clearStorage">即将到期企业</a>
                                <span class="layui-badge" style="display:none;margin-left: 140px;" id="jijiangdaoqiQiye"></span>
                            </dd>
                            <dd data-name="tabs">
                                <a target="mainframe" href="main/shoufei/yidaoqiQiye.html" class="clearStorage">已到期企业</a>
                                <span class="layui-badge" style="display:none;margin-left: 120px;" id="yidaoqiQiye"></span>
                            </dd>
                        </dl>
                    </li>
<!--                    <li data-name="system" class="layui-nav-item">-->
<!--                        <a href="javascript:;" lay-tips="工作牌管理" lay-direction="2">-->
<!--                            <i class="layui-icon layui-icon-user"></i>-->
<!--                            <cite>工作牌管理</cite>-->
<!--                        </a>-->
<!--                        <dl class="layui-nav-child">-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="gongpai/zz_gongpai.html" class="clearStorage">制作工作牌</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="tabs" style="display: none">-->
<!--                                <a target="mainframe" href="system/role.html" class="clearStorage">工作牌记录</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="gongpai/moban_fm.html" class="clearStorage">模板反面管理</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="gongpai/moban_zm.html" class="clearStorage">模板正面管理</a>-->
<!--                            </dd>-->
<!--                        </dl>-->
<!--                    </li>-->

                    <li data-name="system" class="layui-nav-item">
                        <a href="javascript:;" lay-tips="芯片管理" lay-direction="2">
                            <i class="layui-icon layui-icon-file"></i>
                            <cite>NFC卡管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd data-name="nav">
                                <a target="mainframe" href="main/makeCard/staff_kk.html" class="clearStorage">员工开卡</a>
                            </dd>
                            <dd data-name="nav">
                                <a target="mainframe" href="main/card/staff_cz.html">员工充值</a>
                            </dd>
                            <dd data-name="nav">
                                <a target="mainframe" href="main/card/cz_record.html" class="clearStorage">充值记录</a>
                            </dd>
                            <dd data-name="nav">
                                <a target="mainframe" href="main/card/xf_record.html" class="clearStorage">消费记录</a>
                            </dd>
                            <dd data-name="nav">
                                <a target="mainframe" href="main/card/gsbk.html" class="clearStorage">挂失补卡</a>
                            </dd>
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="main/card/shkbk2.html">损坏卡写卡</a>-->
<!--                            </dd>-->
                            <dd data-name="nav">
                                <a target="mainframe" href="main/card/bangdin.html" class="clearStorage">解除绑定关系</a>
                            </dd>
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="main/card/xp_manage.html" class="clearStorage">芯片查询</a>-->
<!--                            </dd>-->
                            <dd data-name="nav">
                                <a target="mainframe" href="main/sdk/sdk.rar">SDK下载</a>
                            </dd>
                        </dl>
                    </li>

                    <li data-name="system" class="layui-nav-item">
                        <a href="javascript:;" lay-tips="商户管理" lay-direction="2">
                            <i class="layui-icon layui-icon-user"></i>
                            <cite>商户管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd data-name="nav">
                                <a target="mainframe" href="main/business/add_business.html" class="clearStorage">新增商户</a>
                            </dd>
                            <dd data-name="nav">
                                <a target="mainframe" href="main/business/manage_business.html" class="clearStorage">商户管理</a>
                            </dd>
                            <!--<dd data-name="nav">
                                <a target="mainframe" href="business/add_business_staff.html" class="clearStorage">新增商户员工</a>
                            </dd>-->
                            <dd data-name="nav">
                                <a target="mainframe" href="main/business/manage_business_staff.html" class="clearStorage">商户员工列表</a>
                            </dd>
                            <dd data-name="nav">
                                <a target="mainframe" href="main/business/trail.html" class="clearStorage">轨迹查询</a>
                            </dd>
                            <dd data-name="nav">
                                <a target="mainframe" href="main/business/wuye_statistics.html" class="clearStorage">物业访问记录</a>
                            </dd>
                            <dd data-name="nav">
                                <a target="mainframe" href="main/business/business_statistics.html" class="clearStorage">商户访问记录</a>
                            </dd>
                            <dd data-name="nav">
                                <a target="mainframe" href="main/business/staff_statistics.html" class="clearStorage">员工访问记录</a>
                            </dd>
                            <dd data-name="nav">
                                <a target="mainframe" href="main/business/staff_trail.html" class="clearStorage">未活动员工统计</a>
                            </dd>
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="dayinji/add_dayinji.html" class="clearStorage">新增打印机</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="dayinji/manage_dayinji.html" class="clearStorage">打印机管理</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="dayinji/dayinji_peizhi.html" class="clearStorage">打印机配置</a>-->
<!--                            </dd>-->
                        </dl>
                    </li>
<!--                    <li data-name="system" class="layui-nav-item">-->
<!--                        <a href="javascript:;" lay-tips="特行办用户管理" lay-direction="2">-->
<!--                            <i class="layui-icon layui-icon-user"></i>-->
<!--                            <cite>登录用户管理</cite>-->
<!--                        </a>-->
<!--                        <dl class="layui-nav-child">-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="nfc_user/nfc_user.html" class="clearStorage">特行办用户管理</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="group_office/group_office.html" class="clearStorage">集团办公室用户管理</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="business_occupation/business_occupation.html" class="clearStorage">工商用户管理</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="certificate/certificate_user_list.html" class="clearStorage">证件用户管理</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="ducha/ducha_user_list.html" class="clearStorage">特行督察App用户管理</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="healthCard/health_card_user_list.html" class="clearStorage">健康证App用户管理</a>-->
<!--                            </dd>-->
<!--                        </dl>-->
<!--                    </li>-->
<!--                    <li data-name="system" class="layui-nav-item">-->
<!--                        <a href="javascript:;" lay-tips="notice" lay-direction="2">-->
<!--                            <i class="layui-icon layui-icon-notice"></i>-->
<!--                            <cite>通知管理</cite>-->
<!--                        </a>-->
<!--                        <dl class="layui-nav-child">-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="notice/addLunbo.html">新增轮播图</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="notice/lunbo.html" class="clearStorage">轮播图管理</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="notice/addNotice.html">新增通知</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="notice/notice.html" class="clearStorage">通知管理</a>-->
<!--                            </dd>-->
<!--                        </dl>-->
<!--                    </li>-->
<!--                    <li data-name="system" class="layui-nav-item">-->
<!--                        <a href="javascript:;" lay-tips="Apk" lay-direction="2">-->
<!--                            <i class="layui-icon layui-icon-headset"></i>-->
<!--                            <cite>应用管理</cite>-->
<!--                        </a>-->
<!--                        <dl class="layui-nav-child">-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="apk/qrcode_apk.html">二维码下载</a>-->
<!--                            </dd>-->
<!--                            <dd data-name="nav">-->
<!--                                <a target="mainframe" href="apk/nfc_apk_manage.html" class="clearStorage">手持应用管理</a>-->
<!--                            </dd>-->
<!--                        </dl>-->
<!--                    </li>-->
                    <li data-name="template" class="layui-nav-item">
                        <a href="javascript:;" lay-tips="聊天管理" lay-direction="2">
                            <i class="layui-icon layui-icon-password"></i>
                            <cite>充值点管理</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd>
                                <a target="mainframe"  href="main/recharge_station/add.html" _lay-href="recharge_station/station_add.html" lay-text="新增充值点" class="clearStorage">新增充值点</a>
                            </dd>
                            <dd>
                                <a target="mainframe"  href="main/recharge_station/station_list.html" _lay-href="recharge_station/station_list.html" lay-text="充值点列表" class="clearStorage">充值点列表</a>
                            </dd>
                        </dl>
                    </li>
                    <li data-name="system" class="layui-nav-item">
                        <a href="javascript:;" lay-tips="权限设定" lay-direction="2">
                            <i class="layui-icon layui-icon-set"></i>
                            <cite>权限设定</cite>
                        </a>
                        <dl class="layui-nav-child">
                            <dd data-name="nav">
                                <a target="mainframe" href="main/system/admin.html" class="clearStorage">用户管理</a>
                            </dd>
                            <dd data-name="tabs">
                                <a target="mainframe" href="main/system/role.html" class="clearStorage">角色管理</a>
                            </dd>
                            <dd data-name="menu">
                                <a target="mainframe" href="main/system/menu.html">菜单管理</a>
                            </dd>
<!--                            <dd>-->
<!--                                <a target="mainframe"  href="main/shenhe/GongSi.html" _lay-href="shenhe/GongSi.html" lay-text="公司审核" class="clearStorage">公司审核</a>-->
<!--                                <span class="layui-badge" id="gongsish" style="display:none;margin-left: 105px;"></span>-->
<!--                            </dd>-->
<!--                            <dd>-->
<!--                                <a target="mainframe"  href="main/shenhe/YuanGong.html" _lay-href="shenhe/YuanGong.html" lay-text="员工审核" class="clearStorage">员工审核</a>-->
<!--                                <span class="layui-badge" id="yuangongsh" style="display:none;margin-left: 105px;"></span>-->
<!--                            </dd>-->
                        </dl>
                    </li>
                    <li data-name="template" class="layui-nav-item">
                        <a  href="main/log/log.html" _lay-href="log/log.html" lay-tips="日志管理" target="mainframe" lay-direction="2" class="clearStorage">
                            <i class="layui-icon layui-icon-survey"></i>
                            <cite>日志管理</cite>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
        <!-- 页面标签 -->
        <!-- <div class="layadmin-pagetabs" id="LAY_app_tabs" style="background: white;">

           &lt;!&ndash;浏览记录条&ndash;&gt;
           <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs" style="display: none">
             <ul class="layui-tab-title" id="LAY_app_tabsheader">
               <li lay-id="staion/station.html" lay-attr="staion/station.html" class="layui-this"><i
                 class="layui-icon layui-icon-home"></i></li>
             </ul>
           </div>
         </div>-->
        <div class="layadmin-pagetabs" id="LAY_app_tabs">
            <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
            <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
            <div class="layui-icon layadmin-tabs-control layui-icon-down">
                <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
                    <li class="layui-nav-item" lay-unselect>
                        <a href="javascript:;"></a>
                        <dl class="layui-nav-child layui-anim-fadein">
                            <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
                            <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
                            <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
                        </dl>
                    </li>
                </ul>
            </div>
            <!--浏览记录条-->
            <div class="layui-tab" lay-unauto lay-allowClose="true" lay-filter="layadmin-layout-tabs">
                <ul class="layui-tab-title" id="LAY_app_tabsheader">
                    <li lay-id="staion/station.html" lay-attr="staion/station.html" class="layui-this">
                        <i class="layui-icon layui-icon-home"></i>
                    </li>
                    <!--<li class="layui-this" lay-href="end.html"><i
                      class="layui-icon layui-icon-home"></i></li>-->
                </ul>
            </div>
        </div>
        <!-- 主体内容 -->
        <div class="layui-body" id="LAY_app_body">
            <div class="layadmin-tabsbody-item layui-show">
                <iframe name="mainframe" id="mainframe" src="main/home.html" frameborder="0" class="layadmin-iframe"></iframe>
            </div>
        </div>
        <!-- 辅助元素，一般用于移动设备下遮罩 -->
        <div class="layadmin-body-shade" layadmin-event="shade"></div>
    </div>
</div>

<script src="./js/layui/layui.js"></script>
<script src="./js/layui/layui.all.js"></script>
<script src="./js/token.js"></script>
<script src="./js/config.js"></script>
<script>

    function logout() {
        console.log("来了")
        // 清空本地数据
        window.localStorage.clear();
        console.log("来了")
        location.href = "index.html";
    }

    layui.config({
        base: 'admin/viewstyle/' //主页样式的嵌入地址
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index'], function () {
        var $ = layui.$
            , admin = layui.admin
            , element = layui.element
            , router = layui.router();

        //解决刷新问题
        element.render();
        element.on('tab(layadmin-layout-tabs)', function (data) {
            setTimeout(function () {
                var e = document.createEvent("MouseEvents");
                e.initEvent("click", true, true);
                document.getElementById("sx").dispatchEvent(e);
            }, 20)
        });

        var active = {
            maintree1: function () {
                admin.popup({
                    title: 'yingfeituo'
                    , shade: 0
                    , anim: -1
                    , area: ['280px', '150px']
                    , id: 'layadmin-layer-skin-test'
                })
            }
            , maintree2: function () {
                top.layui.admin.popupRight({
                    id: 'LAY_adminPopupLayerTest'
                    , success: function () {
                        $('#' + this.id).html('<div class="layui-form-item">' +
                            '<div class="layui-inline ">' +
                            '<input  type="text" id="textfield" placeholder="搜索用户" class="layui-input">' +
                            '<span  id="shusearch" onclick="shusearch()" class="layui-icon layui-icon-search"></span>' +
                            '</div>' +
                            '</div><div id="maintree1" class="demo-tree demo-tree-box"></div>');
                        $("#maintree1").load("/admin/shumoxing/ztree.html");
                    }
                });
            },
        };

        $('.shuxing').on('click', function () {
            var type = $(this).data('type');
            active[type] && active[type].call(this);
        });

        $("#downloadApk").on('click',function () {
            window.open("/apk/downloadApk");
            layer.close(layer.index);
        })

        $("#downloadYqApk").on('click',function () {
            window.open("/apk/downloadYqApk");
            layer.close(layer.index);
        })

        $("#downloadBusinessApk").on('click',function () {
            window.open("/apk/downloadBusinessApk");
            layer.close(layer.index);
        })

        $("#downloadHospitalApk").on('click',function () {
            window.open("/apk/downloadHospitalApk");
            layer.close(layer.index);
        })
        $("#downloadDuChaApk").on('click',function () {
            window.open("/apk/downloadDcApk");
            layer.close(layer.index);
        })

        $("#downloadHealthCardApk").on('click',function () {
            window.open("/apk/downloadHealthCardApk");
            layer.close(layer.index);
        })

        $("#downloadCardManagerApk").on('click',function () {
            window.open("/apk/downloadCardManagerApk");
            layer.close(layer.index);
        })
    });

    $(window).keypress(function (event) {
        if (event.which === 13) {
            shusearch();
        }
    })
    // $('#shusearch').click(function () {
    //     alert("来了");
    // });
    function shusearch() {
        var $ = layui.$
            , admin = layui.admin
            , element = layui.element
            , router = layui.router();
        var othis = $(this)
            , href = 'users/users.html'
            , text = '用户管理'
            , router = layui.router();

        admin.tabsPage.elem = othis;
        //执行跳转
        var topLayui = parent === self ? layui : top.layui;
        topLayui.index.openTabsPage(href, text || othis.text());
        layui.data("wenzi", {
            key: "adminName",
            value: $("#textfield").val()
        })
    }

    function update_password(){
        $("#mainframe").attr("src" , "main/Updatepassword.html?t=1");
    }
</script>

<script>
    layui.use(['jquery'], function(){
        var $ = layui.jquery;
        // njshCount();
        function njshCount(){
            $.ajax({
                url:HOST+"zhiyeChange/selectZhiyeChangeByPage?status=0",
                success:function(res){
                    if(res.code==0){
                        if(res.count>0){
                            // console.log(""+res.data);
                            $(document).find("#zysh").css("display" , "inline-block");
                            $(document).find("#zysh").html(res.count);
                            $(document).find("#zysh2").css("display" , "inline-block");
                            $(document).find("#zysh2").html(res.count);
                        }else{
                            $(document).find("#zysh").css("display" , "none");
                            $(document).find("#zysh2").css("display" , "none");
                        }
                    }
                }
            })
        }
        // setInterval(njshCount , 3000);
    })

    function denglu(){
        $.ajax({
            type:"get",
            url: HOST + "admin/verifyLogin",
            dataType:"json",
            success:function (res) {
                if(res.code==200){
                    $("#uname").html(res.data);
                }else{
                    $("#uname").css('display','none');
                    $("#deng").css('display','block');
                }
            }
        });
    }
    denglu()
    window.setInterval(denglu,5000);
    // 返回按钮事件
    $(".layui-icon-prev").click(function(){
        history.back(); // 后退一次
    });
    $(".layui-icon-next").click(function(){
        history.forward();// 前进一次
    });

</script>
<script>
    layui.use(['jquery'], function(){
        var $ = layui.jquery;
        // daijiaofei();
        $("#home").click()
        // daishenhe();
        yidaoqiQiyeCount();
        function yidaoqiQiyeCount(){
            $.ajax({
                url:HOST+"qiye/yidaoqiQiyeCount",
                success:function(res){
                    if(res.code==200){
                        if(res.data>0){
                            // console.log(""+res.data);
                            $(document).find("#yidaoqiQiye").css("display" , "inline-block");
                            $(document).find("#yidaoqiQiye").html(res.data);
                        }else{
                            $(document).find("#yidaoqiQiye").css("display" , "none");
                        }
                    }
                }
            })
        }
        setInterval(yidaoqiQiyeCount , 5000);

        jijiangdaoqiQiyeCount();
        function jijiangdaoqiQiyeCount(){
            $.ajax({
                url:HOST+"qiye/jiJiangDaoQiQiye",
                success:function(res){
                    if(res.code==0){
                        if(res.count>0){
                            // console.log(""+res.data);
                            $(document).find("#jijiangdaoqiQiye").css("display" , "inline-block");
                            $(document).find("#jijiangdaoqiQiye").html(res.count);
                        }else{
                            $(document).find("#jijiangdaoqiQiye").css("display" , "none");
                        }
                    }
                }
            })
        }
        setInterval(jijiangdaoqiQiyeCount , 5000);

        function daijiaofei(){
            $.ajax({
                url:HOST+"staff/daijiaofei" ,
                success:function(res){
                    if(res.code == 200) {
                        var yidaoqi = res.data.yidaoqi;
                        var kuaidaoqi = res.data.kuaidaoqi;
                        if(yidaoqi > 0) {
                            $(document).find("#yidaoqi").css("display" , "inline-block");
                            $(document).find("#yidaoqi").html(yidaoqi);
                        }else{
                            $(document).find("#yidaoqi").css("display" , "none");
                        }
                        if (kuaidaoqi > 0){
                            $(document).find("#kuaidaoqi").css("display" , "inline-block");
                            $(document).find("#kuaidaoqi").html(kuaidaoqi);
                        }else{
                            $(document).find("#kuaidaoqi").css("display" , "none");
                        }
                    }else{
                        $(document).find("#kuaidaoqi").css("display" , "none");
                        $(document).find("#yidaoqi").css("display" , "none");
                    }
                }
            })
        }
        // setInterval(daijiaofei , 3000);

        function daishenhe(){
            $.ajax({
                url:HOST+"staff/daishenhe" ,
                data:{status:1} ,
                success:function(res){
                    // console.log(res);
                    var gongsi = res.data.gongsi;
                    var staff = res.data.staff;
                    if(res.code == 200) {
                        if (gongsi > 0 || staff > 0){
                            $(document).find("#shenhe").css("display" , "inline-block");
                            $(document).find("#shenhe").html(gongsi+staff);
                        }

                        if(staff > 0){
                            $(document).find("#yuangongsh").css("display" , "inline-block");
                            $(document).find("#yuangongsh").html(staff);
                        }else{
                            $(document).find("#yuangongsh").css("display" , "none");
                        }

                        if(gongsi > 0){
                            $(document).find("#gongsish").css("display" , "inline-block");
                            $(document).find("#gongsish").html(gongsi);
                        }else{
                            $(document).find("#gongsish").css("display" , "none");
                        }

                        if(res.data.gongsi==0 && res.data.staff==0) {
                            $(document).find("#shenhe").css("display", "none");
                            $(document).find("#gongsish").css("display", "none");
                            $(document).find("#yuangongsh").css("display", "none");
                        }
                    }else{
                        $(document).find("#shenhe").css("display" , "none");
                        $(document).find("#gongsish").css("display" , "none");
                        $(document).find("#yuangongsh").css("display" , "none");
                    }
                }
            })
        }
        // setInterval(daishenhe , 5000)
    })
</script>
</body>
</html>